﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Descripción breve de WebConfiguration
/// </summary>
public static  class WebConfiguration
{
    public static string GetStringConexion()
    {
        System.Configuration.Configuration rootWebConfig =
           System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("/TVMedia3Web");
        System.Configuration.ConnectionStringSettings connString;
        if (0 < rootWebConfig.ConnectionStrings.ConnectionStrings.Count)
        {
            connString = rootWebConfig.ConnectionStrings.ConnectionStrings["bdtvmediaSConnectionString"];
            if (null != connString)
                return connString.ToString();
            else
                return null;
        }
        return null;
    }
}
